

<div id="content">
    <div id="title_content">Ảnh của trang chủ</div>

    <?php if ($this->session->flashdata('error')): ?>
        <div class="affiche_erreur">
        <?php echo $this->session->flashdata('error'); ?>
    </div>
    <?php endif; ?>
        <form method="POST" action="<?php echo site_url('admin_home/delete_multi_home_images') ?>" onsubmit="return go();">

            <table class="list" width="100%">
                <thead>
                    <tr>
                        <th width="20px"><input type="checkbox" name="deleteall" id="deleteall"/></th>
                        <th>Hình ảnh</th>
                       
                        <th>Tác vụ</th>
                    </tr>
                </thead>
                <tbody>
                <?php foreach ($home_images as $aRow): 
                    $image_path = './assets/images/home/' . $aRow['file_name'];
                        if ($aRow['file_name'] != '') {
                            if (file_exists($image_path)) {
                                $image_path = base_url() . 'assets/images/home/' . $aRow['file_name'];
                            } else {
                                $image_path = base_url() . 'assets/images/no_image/noimage.jpg';
                            }
                        }  else {
                            $image_path = base_url() . 'assets/images/no_image/noimage.jpg';
                        }
                    ?>
                    <tr>
                        <td><input type="checkbox" name="delete[]" value="<?php echo $aRow['id'] ?>" class="delete" /></td>
                        <td><img src="<?php echo $image_path; ?>" alt="" width="250px" height="200px"/></td>
                                               
                        <td width="30px"><a class="confirm_delete" href="<?php echo site_url('admin_home/delete_home_image') . '/' . $aRow['id'] ; ?>"><img src="<?php echo base_url() ?>assets/admin/images/supprimer.png" alt="supprimer"/></a></td>

                    </tr>
                <?php endforeach; ?>
                </tbody>
            </table>
            <div class="delete_button">
                <table width="100%">
                    <tr>
                        <td align="left" width="200px" ><input type="submit" value="Xóa" name="submit"/></td>
                        
                </tr>
            </table>
        </div>
        <!--END delete_button-->
    </form>
</div>
<!--END content-->
